home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-03-09 | 1.6 KB | 52 lines | [TEXT/ttxt] |
- constant kAppSymbol := '|Checkbook:PIETraining|;
- constant kAppObject := '["Check", "Checks"];
- constant kSoupName := "Checkbook:PIETraining";
- constant kCheckFormatSymbol := '|CheckFormat:Checkbook:PIETraining|;
- constant kSoupIndexes := '[
- {structure: slot, path: date, type: int},
- {structure: slot, path:number, type: int},
- ];
- constant kAppName := "Checkbook";
- constant kMaxApplicationWidth := 800;
- constant kMaxApplicationHeight := 1600;
-
- DefConst('kMinutesPerDay, 24 * 60);
-
-
- InstallScript := func(packageFrame)
- begin
- // to set up routing
- routing.(kAppSymbol) := packageFrame.theForm.routingFrame;
- GetRoot().(kCheckFormatSymbol) := BuildContext(packageFrame.theForm.printFormat);
-
- // To be notified of changes to the soup (including a changed folder)
- AddArraySlot(soupNotify, kSoupName);
- AddArraySlot(soupNotify, kAppSymbol);
-
- // for Find All
- AddArraySlot(findApps, kAppSymbol);
-
- // for IA
- packageFrame.taskTemplateID := RegTaskTemplate(packageFrame.theForm.taskTemplate);
- end;
-
- RemoveScript := func(packageFrame)
- begin
- // remove routing
- RemoveSlot(routing, kAppSymbol);
- RemoveSlot(GetRoot(), kCheckFormatSymbol);
-
- // remove soup name and app symbol from soupNotify array
- local soupNotifyPos := ArrayPos(soupNotify, kAppSymbol, 0, nil);
- ArrayRemoveCount(soupNotify, soupNotifyPos - 1, 2);
-
- // for Find All
- SetRemove(findApps, kAppSymbol);
-
- // for IA
- if packageFrame.taskTemplateID then begin
- UnRegTaskTemplate(packageFrame.taskTemplateID);
- packageFrame.taskTemplateID := nil;
- end;
- end;
-